package com.sgzn.sgpay.service.tcp.model;

import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

/**
 * Created by xxjs-gd-llf
 * DATETIME:2018/4/11 23:18
 * Description: 服务器远程消费充值（服务器上分）
 */
@Setter
@Getter
public class TcpRefundRequest {
    private String beginCode;

    private String commandCode;


    /**
     * 设备ID
     */
    @NotBlank
    String deviceId;

    /**
     * 退款流水ID
     */
    private String refundId;

    /**
     * 退款金额单位元
     */
    @NotBlank
    private  String amount;

    @NotBlank
    private  String checkSumCode;

    private String endCode;

    @Override
    public String toString(){
        //根据协议规范重载toString方法
        return beginCode+commandCode  + deviceId + refundId + amount+ checkSumCode+endCode;
    }

}
